'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const url = 'https://api.juejin.cn/user_api/v1/user/get?aid=2608&uuid=7003223308606981632&user_id=3007907048723991&not_self=1'
	const {data} = await uniCloud.httpclient.request(url, {
		contentType: 'json',
		dataType: 'json'
	})
	//返回数据给客户端
	console.log(data)
	if(data.err_no === 0) {
		return {
			code: 0,
			data: data.data
		}
	} else {
		return  {
			code: data.err_no,
			message: data.err_msg
		}
	}
};
